<?
	session_start();
			
			require_once('../config.php');
			include_once("../database/DataBase.php");
			include_once("function.php");

			$pid = $_POST["pid"];
			$amount = $_POST["amount"];
			
			
			$database = New DataBase();
			$database->open_connection();
			$result = $database->getProductByPID($pid);
			
			$product = mysql_fetch_assoc($result);
			
			
			echo "<tr>";
				echo "<td>";
				echo "<input type='text' name='product_code[]' value='".$product["product_code"]."' readonly />";
				echo "<input type='hidden' name='product_id[]' value='".$product["pid"]."' />";
				echo "</td>";
				echo "<td>";
				echo "<input type='text' name='product_name[]' value='".$product["name"]."' readonly />";
				echo "</td>";
				echo "<td>";
				echo "<input type='text' name='product_amount[]' value='".$amount."' readonly />";
				echo "</td>";
				echo "<td>";
				echo "<input type='text' name='product_price[]' value='".$product["price"]."' readonly />";
				echo "</td>";
			echo "</tr>";
			
			$database->close_connection();
?>